<?php 
$cs=Yii::app()->clientScript;
$cssUrl= Yii::app()->request->baseUrl."/css/";
$jsUrl = Yii::app()->request->baseUrl."/js/";
$cs->registerCssFile($cssUrl."deposit.css");
$cs->registerScriptFile($jsUrl."deposit.js");
$spent = number_format($model->details->cpuv * $model->uv,2);
$balance = number_format($model->budget - $spent,2);
?>
<div id="main-col-small" class="div">
	<div class="mainColInner deposit">
		<div class="subPageHeader">
			<h1><?=Yii::t('adv','budget')?></h1>
		</div>
		<h4><?=Yii::t('adv','info_basic')?></h4>
		<div class="over-hidden ui-box-gray pa-v-10">
			<div class="over-hidden mg-b-5">
				<label><?=Yii::t('adv','title')?></label>
				<span class="left bold"><?=$model->details->title?></span>
			</div>
			<div class="over-hidden mg-b-5">
				<label ><?=Yii::t('adv','spent')?></label>
				<span class="left bold"><?=$spent ?></span>
			</div>
			<div class="over-hidden">
				<label ><?=Yii::t('adv','balance')?></label>
				<span class="left bold"><?=$balance?></span>
			</div>
		</div>
		<br>
		<h4><?=Yii::t('adv','budget_add')?></h4>
		<div class="ui-box-gray pa-v-10">
			<div class="over-hidden mg-b-5">
				<label class="float-left"><?=Yii::t('adv','budget_count_add')?></label>
				<div class="float-left">
					<?php echo CHtml::textField('amount','300',array('id'=>'amount','class'=>'tright left','autocomplete'=>'off'));?>
				</div>
				<p class="left" style="color:#666;margin-left:20px;font-size:12px"><?=Yii::t('adv', 'budget_add_explain')?></p>
			</div>
			<div class="over-hidden">
				<label>&nbsp;</label>
				<p class="float-left pa-h-5">+</p>
				<div>
					<?php echo CHtml::link('100','#',array('class'=>'btn btnAdd','val'=>'100'));
						  echo CHtml::link('500','#',array('class'=>'btn btnAdd','val'=>'500'));
						  echo CHtml::link('1000','#',array('class'=>'btn btnAdd','val'=>'1000'));
						  echo CHtml::link('5000','#',array('class'=>'btn btnAdd','val'=>'5000'));
					?>
				</div>
			</div>
		</div>
		<br>
		<h4><?=Yii::t('adv', 'method_payment')?></h4>
		<div class="ui-box-gray pa-v-10">
			<div class="over-hidden">
				<label><?=Yii::t('adv', 'method_payment').':'?></label>
				<div class="over-hidden pgs">
					<input id="PgsAlipay" type="radio" checked="checked" value="alipay" name="data[pgs]">
					<label for="PgsAlipay"><?=Yii::t('adv', 'method_payment_alipay')?></label>
					<input id="PgsDeposit" type="radio" value="deposit" name="data[pgs]">
					<label for="PgsDeposit"><?=Yii::t('adv','deposit')?></label>
				</div>
				<div class="forPg PgsAlipay" >
					<img src="/img/card_logo.png">
				</div>
				<p class="forPg PgsDeposit hidden"><?=Yii::t('adv', 'current_deposit')?>0</p>
			</div>
		</div>
		<br>
		<!-- <form name="payment_form" method="post" id="alipay_form" beforesubmit="/adv/checkAmount/" ad_id="565" action="https://www.alipay.com/cgi-bin/webscr"><input type="hidden" value="_xclick" name="cmd"><input type="hidden" value="1" name="no_note"><input type="hidden" value="1" name="no_shipping"><input type="hidden" value="USD" name="currency_code"><input type="hidden" value="cfo@adby.me" name="business"><input type="hidden" value="AdbyMe: Budget for 淘宝淘开心" name="item_name"><input type="hidden" value="" name="custom"><input type="hidden" value="" name="amount"><input type="hidden" value="https://adby.me/alipay/callback/ad_id:565" name="notify_url"><input type="hidden" value="https://adby.me/alipay/callback/ad_id:565" name="return"></form>
		<form method="post" id="deposit_form" action="/adv/deposit/"><input type="hidden" value="" name="data[amount]"><input type="hidden" value="" name="data[postpay_id]"><input type="hidden" value="565" name="data[ad_id]"></form>
		-->
		<div class="over-hidden"> 
			<?php echo CHtml::link(Yii::t('adv','pay'),null,array('id'=>'btn_submit','class'=>'btn_dark float-left'));?>
			<div class="loading float-left" style="height:33px;width:40px;display:none"></div>
		</div>
	</div>
</div>
<div id="side-col" class="float-right">
<?php 
$this->widget('TagEffect');
$this->widget('AdvRules');
?>
</div>
	